﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using MySql.Data;
namespace DnDDB
{
    public class Spell
    {
        private int id;
		private string name;
	  	private int level;
	
        public Spell(string name)
        {
			string dbCommand = "SELECT * FROM `Spell` spell WHERE " +
			"spell.name = '" + name + "';";
            getMySQL get = new getMySQL();
    		DataRow dt = get.GetMySQLFilledRow(dbCommand);
			this.level = Convert.ToInt32(dt["level"]);
			this.name = dt["name"].ToString();
            this.id = Convert.ToInt32(dt["id"]);
        }
		
		public string getName(){
			return name;
		}
		
		public int getLevel(){
			return level;
		}

        public int getId()
        {
            return id;
        }
		
    }
}
